#pragma once
#include <memory>
#include <spdlog/spdlog.h>
#include "spdlog/fmt/ostr.h" // must be included
#include "spdlog/sinks/stdout_sinks.h"
namespace GL
{
    class Log
    {
    public:
        static void Init();

        inline static std::shared_ptr<spdlog::logger> &GetGlLogger()
        {
            return gl_logger;
        }

    private:
        static std::shared_ptr<spdlog::logger> gl_logger;
    };

}

#define GL_WARN(...) ::GL::Log::GetGlLogger()->warn(__VA_ARGS__)
#define GL_ERROR(...) ::GL::Log::GetGlLogger()->error(__VA_ARGS__)
#define GL_INFO(...) ::GL::Log::GetGlLogger()->info(__VA_ARGS__)
#define GL_TRACE(...) ::GL::Log::GetGlLogger()->trace(__VA_ARGS__)
